<?php
	$xtpl_main->assign ( "page_title", "Login" );
	//--
	
	if(isset($_POST['frmAct']) && $_POST['frmAct'] == 'doLogin'){
		$rsDoLogin = mysql_query("SELECT member_id, member_displayname FROM member WHERE member_username = '".stripslashes($_POST['username'])."' AND member_password = '".md5($_POST['password'])."'");
		if(sizeof($rsDoLogin) > 0){
			$rowDoLogin = mysql_fetch_array($rsDoLogin);
			$_SESSION['onlineMemberDisplayName'] = $rowDoLogin['member_displayname'];
			$_SESSION['onlineMemberId'] = $rowDoLogin['member_id'];
			header("Location: index.php");
		}
	}
?>